﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MvcApplication4.Models
{
    # region Models
    public class Student
    {
        #region Properties
        /// <summary>
        /// Gets or sets the University Code 
        /// </summary>
        public long UniversityCode { get; set; }

        /// <summary>
        /// Gets or sets the course title
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the duration in days of the course
        /// </summary>                
        public int Duration { get; set; }

        /// <summary>
        /// Gets or sets course fees
        /// </summary>        
        public double CourseFees { get; set; }

        /// <summary>
        /// Gets or sets CGPA
        /// </summary>        
        public double CGPA { get; set; }

        #endregion
    }
    public class StudentDataContext
    {
        #region Properties

        /// <summary>
        /// Gets  the courses in a IQueryable format
        /// </summary>
        public List<Student> Student
        {
            get
            {
                List<Student> student = new List<Student>();
                Student stu = new Student();
                int code = 10000;
                for (long i = 0; i < 1200; i++)
                {
                    Student[] s = new Student[10];
                    s[0] = new Student() { UniversityCode = code + 1, CourseFees = 2000.00, CGPA = 7.52, Duration = 90, Title = "Distributed Component Architecture" };
                    s[1] = new Student() { UniversityCode = code + 2, CourseFees = 1000.00, CGPA = 9.55, Duration = 60, Title = "Data Structures" };
                    s[2] = new Student() { UniversityCode = code + 3, CourseFees = 1750.00, CGPA = 9.03, Duration = 75, Title = "Neural Networks" };
                    s[3] = new Student() { UniversityCode = code + 4, CourseFees = 2000.00, CGPA = 8.91, Duration = 90, Title = "Genetic Algorithms" };
                    s[4] = new Student() { UniversityCode = code + 5, CourseFees = 1000.00, CGPA = 9.55, Duration = 30, Title = "Grid Computing" };
                    s[5] = new Student() { UniversityCode = code + 6, CourseFees = 2500.00, CGPA = 9.87, Duration = 60, Title = "Cloud Computing" };
                    s[6] = new Student() { UniversityCode = code + 7, CourseFees = 1500.00, CGPA = 9.75, Duration = 90, Title = "Enterprise Computing" };
                    s[7] = new Student() { UniversityCode = code + 8, CourseFees = 1250.00, CGPA = 9.66, Duration = 45, Title = "Mobile Computing" };
                    s[8] = new Student() { UniversityCode = code + 9, CourseFees = 1000.00, CGPA = 8.33, Duration = 60, Title = "WAP and XML" };
                    s[9] = new Student() { UniversityCode = code + 10, CourseFees = 1500.00, CGPA = 8.66, Duration = 75, Title = "Design Patterns" };
                    foreach (Student studnt in s)
                    {
                        student.Add(studnt);
                    }

                    code += 10;
                }

                return student;
            }
        }

        /// <summary>
        /// Gets the JSONStudent
        /// </summary>
        public List<Student> JSONStudent
        {
            get
            {
                List<Student> student = new List<Student>();
                Student stu = new Student();
                int code = 10000;
                for (long i = 0; i < 1000; i++)
                {
                    Student[] s = new Student[10];
                    s[0] = new Student() { UniversityCode = code + 1, CourseFees = 2000.00, CGPA = 7.52, Duration = 90, Title = "Distributed Component Architecture" };
                    s[1] = new Student() { UniversityCode = code + 2, CourseFees = 1000.00, CGPA = 9.55, Duration = 60, Title = "Data Structures" };
                    s[2] = new Student() { UniversityCode = code + 3, CourseFees = 1750.00, CGPA = 9.03, Duration = 75, Title = "Neural Networks" };
                    s[3] = new Student() { UniversityCode = code + 4, CourseFees = 2000.00, CGPA = 8.91, Duration = 90, Title = "Genetic Algorithms" };
                    s[4] = new Student() { UniversityCode = code + 5, CourseFees = 1000.00, CGPA = 9.55, Duration = 30, Title = "Grid Computing" };
                    s[5] = new Student() { UniversityCode = code + 6, CourseFees = 2500.00, CGPA = 9.87, Duration = 60, Title = "Cloud Computing" };
                    s[6] = new Student() { UniversityCode = code + 7, CourseFees = 1500.00, CGPA = 9.75, Duration = 90, Title = "Enterprise Computing" };
                    s[7] = new Student() { UniversityCode = code + 8, CourseFees = 1250.00, CGPA = 9.66, Duration = 45, Title = "Mobile Computing" };
                    s[8] = new Student() { UniversityCode = code + 9, CourseFees = 1000.00, CGPA = 8.33, Duration = 60, Title = "WAP and XML" };
                    s[9] = new Student() { UniversityCode = code + 10, CourseFees = 1500.00, CGPA = 8.66, Duration = 75, Title = "Design Patterns" };
                    foreach (Student studnt in s)
                    {
                        student.Add(studnt);
                    }

                    code += 10;
                }

                return student;
            }
        }

        /// <summary>
        /// Gets the PassThroughStudent
        /// </summary>
        public List<Student> PassThroughStudent
        {
            get
            {
                List<Student> student = new List<Student>();
                Student stu = new Student();
                int code = 10000;
                for (long i = 0; i < 1000; i++)
                {
                    Student[] s = new Student[10];
                    s[0] = new Student() { UniversityCode = code + 1, CourseFees = 2000.00, CGPA = 7.52, Duration = 90, Title = "Distributed Component Architecture" };
                    s[1] = new Student() { UniversityCode = code + 2, CourseFees = 1000.00, CGPA = 9.55, Duration = 60, Title = "Data Structures" };
                    s[2] = new Student() { UniversityCode = code + 3, CourseFees = 1750.00, CGPA = 9.03, Duration = 75, Title = "Neural Networks" };
                    s[3] = new Student() { UniversityCode = code + 4, CourseFees = 2000.00, CGPA = 8.91, Duration = 90, Title = "Genetic Algorithms" };
                    s[4] = new Student() { UniversityCode = code + 5, CourseFees = 1000.00, CGPA = 9.55, Duration = 30, Title = "Grid Computing" };
                    s[5] = new Student() { UniversityCode = code + 6, CourseFees = 2500.00, CGPA = 9.87, Duration = 60, Title = "Cloud Computing" };
                    s[6] = new Student() { UniversityCode = code + 7, CourseFees = 1500.00, CGPA = 9.75, Duration = 90, Title = "Enterprise Computing" };
                    s[7] = new Student() { UniversityCode = code + 8, CourseFees = 1250.00, CGPA = 9.66, Duration = 45, Title = "Mobile Computing" };
                    s[8] = new Student() { UniversityCode = code + 9, CourseFees = 1000.00, CGPA = 8.33, Duration = 60, Title = "WAP and XML" };
                    s[9] = new Student() { UniversityCode = code + 10, CourseFees = 1500.00, CGPA = 8.66, Duration = 75, Title = "Design Patterns" };
                    foreach (Student studnt in s)
                    {
                        student.Add(studnt);
                    }

                    code += 10;
                }

                return student;
            }
        }

        /// <summary>
        /// Gets of sets the AutoFormatStudent
        /// </summary>
        public List<Student> AutoFormatStudent
        {
            get
            {
                List<Student> student = new List<Student>();
                Student stu = new Student();
                int code = 10000;
                for (long i = 0; i < 100; i++)
                {
                    Student[] s = new Student[10];
                    s[0] = new Student() { UniversityCode = code + 1, CourseFees = 2000.00, CGPA = 7.52, Duration = 90, Title = "Distributed Component Architecture" };
                    s[1] = new Student() { UniversityCode = code + 2, CourseFees = 1000.00, CGPA = 9.55, Duration = 60, Title = "Data Structures" };
                    s[2] = new Student() { UniversityCode = code + 3, CourseFees = 1750.00, CGPA = 9.03, Duration = 75, Title = "Neural Networks" };
                    s[3] = new Student() { UniversityCode = code + 4, CourseFees = 2000.00, CGPA = 8.91, Duration = 90, Title = "Genetic Algorithms" };
                    s[4] = new Student() { UniversityCode = code + 5, CourseFees = 1000.00, CGPA = 9.55, Duration = 30, Title = "Grid Computing" };
                    s[5] = new Student() { UniversityCode = code + 6, CourseFees = 2500.00, CGPA = 9.87, Duration = 60, Title = "Cloud Computing" };
                    s[6] = new Student() { UniversityCode = code + 7, CourseFees = 1500.00, CGPA = 9.75, Duration = 90, Title = "Enterprise Computing" };
                    s[7] = new Student() { UniversityCode = code + 8, CourseFees = 1250.00, CGPA = 9.66, Duration = 45, Title = "Mobile Computing" };
                    s[8] = new Student() { UniversityCode = code + 9, CourseFees = 1000.00, CGPA = 8.33, Duration = 60, Title = "WAP and XML" };
                    s[9] = new Student() { UniversityCode = code + 10, CourseFees = 1500.00, CGPA = 8.66, Duration = 75, Title = "Design Patterns" };
                    foreach (Student studnt in s)
                    {
                        student.Add(studnt);
                    }

                    code += 10;
                }

                return student;
            }
        }
        #endregion
    }
    public class Student_Details
    {
        #region Properties
        /// <summary>
        /// Gets or sets the University Code 
        /// </summary>
        public long UniversityCode { get; set; }

        /// <summary>
        /// Gets or sets the Mark 1
        /// </summary>
        public double M1 { get; set; }

        /// <summary>
        /// Gets or sets the Mark 2
        /// </summary>                
        public double M2 { get; set; }

        /// <summary>
        /// Gets or sets Mark 3
        /// </summary>        
        public double M3 { get; set; }

        /// <summary>
        /// Gets or sets Mark 4
        /// </summary>        
        public double M4 { get; set; }

        #endregion
    }
    public class Student_DetailsDataContext
    {
        #region Properties

        /// <summary>
        /// Gets  the courses in a IQueryable format
        /// </summary>
        public List<Student_Details> Student_Details
        {
            get
            {
                List<Student_Details> student_detail = new List<Student_Details>();
                Student_Details stu = new Student_Details();
                int code = 10000;
                for (long i = 0; i < 1200; i++)
                {
                    Student_Details[] s = new Student_Details[10];
                    s[0] = new Student_Details() { UniversityCode = code + 1, M1 = 78.00, M2 = 74.52, M3 = 90, M4 = 74.52 };
                    s[1] = new Student_Details() { UniversityCode = code + 2, M1 = 89.00, M2 = 97.55, M3 = 60, M4 = 64.52 };
                    s[2] = new Student_Details() { UniversityCode = code + 3, M1 = 67.00, M2 = 95.03, M3 = 75, M4 = 54.52 };
                    s[3] = new Student_Details() { UniversityCode = code + 4, M1 = 89.00, M2 = 83.91, M3 = 90, M4 = 44.52 };
                    s[4] = new Student_Details() { UniversityCode = code + 5, M1 = 56.00, M2 = 93.55, M3 = 30, M4 = 74.52 };
                    s[5] = new Student_Details() { UniversityCode = code + 6, M1 = 90.00, M2 = 94.87, M3 = 60, M4 = 94.52 };
                    s[6] = new Student_Details() { UniversityCode = code + 7, M1 = 77.00, M2 = 93.75, M3 = 90, M4 = 74.52 };
                    s[7] = new Student_Details() { UniversityCode = code + 8, M1 = 66.00, M2 = 95.66, M3 = 45, M4 = 56.52 };
                    s[8] = new Student_Details() { UniversityCode = code + 9, M1 = 89.00, M2 = 86.33, M3 = 60, M4 = 88.52 };
                    s[9] = new Student_Details() { UniversityCode = code + 10, M1 = 87.00, M2 = 87.66, M3 = 75, M4 = 87.52 };
                    foreach (Student_Details studnt in s)
                    {
                        student_detail.Add(studnt);
                    }

                    code += 10;
                }

                return student_detail;
            }
        }
        #endregion
    }
    #endregion
}